package fr.loof.fonzie.parsers;

import java.util.List;
import java.util.ListIterator;

/**
 * @author Administrateur
 *
 */
public class DelegateProperty
    extends Property
{
    private Property delegate;

    public String toString()
    {
        return delegate.toString();
    }

    public DelegateProperty( Property property )
    {
        super( property.getName() );
        this.delegate = property;
    }

    public boolean doCheckType( Class parameterType )
    {
        return delegate.doCheckType( parameterType );
    }

    public Class getEntity()
    {
        return delegate.getEntity();
    }

    public String getName()
    {
        return delegate.getName();
    }

    public Class getType()
    {
        return delegate.getType();
    }

    public boolean postProcess( ListIterator<QueryElement> elements )
    {
        return delegate.postProcess( elements );
    }

    public void process( JPQLPersistenceQuery jpqlQuery, List<Class> params )
    {
        delegate.process( jpqlQuery, params );
        jpqlQuery.setCurrentProperty( this );
    }
}
